﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Task>" %>
<%@ Import Namespace="ViewRes" %>

<script type="text/javascript">
    $(function() {
        $("#CollaborationRoomId").clone().appendTo("#taskAddForm");
    });
</script>
<div class="container">

    <%
        using (
            Html.BeginRouteForm("Default", new {controller = "Tasks", action = "Add"}, FormMethod.Post,
                                new {id = "taskAddForm"}))
        {%>

      <span>
        <%:Html.DropDownList("PlaningTypeId", (IEnumerable<SelectListItem>) ViewData["PlaningTypes"],
                                                new {onchange = "planingTypeChanged()"})%>
    </span>
     
    <table>
        <tr>
            <td>
                <%:SharedStrings.Name%>
            </td>
            <td>
                <%:Html.TextBoxFor(gt => gt.Name)%>
            </td>
        </tr>
         <tr>
            <td>
               <%:SharedStrings.Description%>
            </td>
            <td>
                <%:Html.TextBoxFor(gt => gt.Description)%>
            </td>
        </tr>
        <tr>
            <td>
                 <%:SharedStrings.Date%>
            </td>
            <td>
                <%:Html.TextBoxFor(model => model.StartDate, new {id = "StartDate"})%>
            </td>
        </tr>
         <tr>
            <td>
                <a href="javascript:void(0)" onclick=' loadTasksByRoomAndPlaning("PlaningTypeId", $("#StartDate").val(), "PrevCheckPointId"); '> <%:LecturerStrings.Previous%></a>
            </td>
            <td>
                <select id="PrevCheckPointId" name="PrevCheckPointId">
                    <option class='disabled'> <%:LecturerStrings.No%></option>
                </select>   
               
            </td>
        </tr>
        <tr>
            <td>
                <%:LecturerStrings.ToAll%>:
            </td>
            <td>
                <input id="ToAll" type="checkbox" name="ToAll" value="true" />
                <input type="hidden" value="false" name="ToAll" />
            </td>
        </tr>
    </table>
    <div style="float: right">
        <input type="submit" value="OK" />
    </div>
    <%
        }%>
</div>
